<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>aws-crt-cpp: /home/ANT.AMAZON.COM/dengket/doc/aws-crt-cpp/include/aws/crt/io/Stream.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">aws-crt-cpp
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_076842b242c291358044feb169933571.html">aws</a></li><li class="navelem"><a class="el" href="dir_cc4322e4b2151c90adb7cd2e3f54423a.html">crt</a></li><li class="navelem"><a class="el" href="dir_b90b4e231cf9df4b6b8451850277e486.html">io</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Stream.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="Stream_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * You may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * A copy of the License is located at</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *  http://aws.amazon.com/apache2.0</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * express or implied. See the License for the specific language governing</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * permissions and limitations under the License.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="Exports_8h.html">aws/crt/Exports.h</a>&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="Types_8h.html">aws/crt/Types.h</a>&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;aws/io/stream.h&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceAws.html">Aws</a></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;{</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="keyword">namespace </span>Crt</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    {</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <span class="keyword">namespace </span>Io</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        {</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Io.html#a610cfe7a844d9e8b9ea7e319bc1ed1ea">   27</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#a610cfe7a844d9e8b9ea7e319bc1ed1ea">StreamStatus</a> = aws_stream_status;</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Io.html#af399239ad685d64f2f5b88a0906a232c">   28</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#af399239ad685d64f2f5b88a0906a232c">OffsetType</a> = aws_off_t;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0">   30</a></span>&#160;            <span class="keyword">enum class</span> <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0">StreamSeekBasis</a></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;            {</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0a1a06729125544cab7cee73195fc044f0">Begin</a> = AWS_SSB_BEGIN,</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0a87557f11575c0ad78e4e28abedc13b6e">End</a> = AWS_SSB_END,</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;            };</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">            /***</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">             * Interface for building an Object oriented stream that will be honored by the CRT&#39;s low-level</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">             * aws_input_stream interface. To use, create a subclass of InputStream and define the abstract</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">             * functions.</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">   41</a></span>&#160;            <span class="keyword">class </span><a class="code" href="Exports_8h.html#a0a3f6c46aee6b588ce99a142cdb22d1d">AWS_CRT_CPP_API</a> <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            {</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;              <span class="keyword">public</span>:</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                <span class="keyword">virtual</span> ~<a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a>();</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a>(<span class="keyword">const</span> <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a>(<a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a> &amp;&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a> &amp;operator=(<a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a> &amp;&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a4c90e7c1e55cc9c68f0e4ed5f098c393">   50</a></span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#ad75dadb36312abc4c9126b1e5e338897">   51</a></span>&#160;                <span class="keyword">explicit</span> <span class="keyword">operator</span> bool() const noexcept { <span class="keywordflow">return</span> IsValid(); }</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a4c6094ba9a7457d1406b23c625c817eb">   52</a></span>&#160;                <span class="keyword">virtual</span> <span class="keywordtype">bool</span> IsValid() const noexcept = 0;</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#ac001ce04acbaa13df20a3790e7bb17a0">   53</a></span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                aws_input_stream *GetUnderlyingStream() noexcept { <span class="keywordflow">return</span> &amp;m_underlying_stream; }</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a1d367e40fb699edfbc586f1da8d359c9">   55</a></span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a103064353d7d3d35ecaca566e48febe3">   56</a></span>&#160;                <span class="keywordtype">bool</span> Read(<a class="code" href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">ByteBuf</a> &amp;dest) { <span class="keywordflow">return</span> aws_input_stream_read(&amp;m_underlying_stream, &amp;dest) == 0; }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                <span class="keywordtype">bool</span> Seek(<a class="code" href="namespaceAws_1_1Crt_1_1Io.html#af399239ad685d64f2f5b88a0906a232c">OffsetType</a> <a class="code" href="namespaceAws.html#a4b36e73e20878ce98336cfdea0494281">offset</a>, <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0">StreamSeekBasis</a> seekBasis)</div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#aa683964eae083c1f7f01a5cef6d5c88c">   58</a></span>&#160;                {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                    <span class="keywordflow">return</span> aws_input_stream_seek(&amp;m_underlying_stream, <a class="code" href="namespaceAws.html#a4b36e73e20878ce98336cfdea0494281">offset</a>, (aws_stream_seek_basis)seekBasis) == 0;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a63148e32fbcb9b8c607e3b0b038f2e88">   60</a></span>&#160;                }</div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a6c04d790f1741ea0a49285e7aa4928fc">   61</a></span>&#160;                <span class="keywordtype">bool</span> GetStatus(<a class="code" href="namespaceAws_1_1Crt_1_1Io.html#a610cfe7a844d9e8b9ea7e319bc1ed1ea">StreamStatus</a> &amp;status)</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                {</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                    <span class="keywordflow">return</span> aws_input_stream_get_status(&amp;m_underlying_stream, &amp;status) == 0;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                }</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a710e72d2234c334663801a98106c92ac">   65</a></span>&#160;                <span class="keywordtype">bool</span> GetLength(int64_t &amp;<a class="code" href="namespaceAws.html#a52c438299b08516e5d87b48ded603a6e">length</a>)</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                    <span class="keywordflow">return</span> aws_input_stream_get_length(&amp;m_underlying_stream, &amp;<a class="code" href="namespaceAws.html#a52c438299b08516e5d87b48ded603a6e">length</a>) == 0;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                }</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#aa50980fbe2d533a751a1f37a96266730">   69</a></span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;              <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                <a class="code" href="namespaceAws_1_1Crt.html#a3c9efb213e2de565038afcfd4f8afcda">Allocator</a> *m_allocator;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                aws_input_stream m_underlying_stream;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a>(<a class="code" href="namespaceAws_1_1Crt.html#a3c9efb213e2de565038afcfd4f8afcda">Aws::Crt::Allocator</a> *allocator = <a class="code" href="namespaceAws_1_1Crt.html#a7178ef65f261a8db52a624458331bbb2">g_allocator</a>);</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a336d789eab234c8a4f5226ce535c7c7d">   75</a></span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a2d2f659060cab549b200711948b7c158">   76</a></span>&#160;<span class="comment">                /***</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">                 * Read up-to buffer::capacity - buffer::len into buffer::buffer</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">                 * Increment buffer::len by the amount you read in.</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">                 *</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">                 * @return true on success, false otherwise. Return false, when there is nothing left to read.</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">                 * You SHOULD raise an error via aws_raise_error()</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">                 * if an actual failure condition occurs.</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ReadImpl(<a class="code" href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">ByteBuf</a> &amp;<a class="code" href="namespaceAws.html#ab680d00d3625d576b9160710e643da63">buffer</a>) noexcept = 0;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                <span class="keyword">virtual</span> <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#a610cfe7a844d9e8b9ea7e319bc1ed1ea">StreamStatus</a> GetStatusImpl() const noexcept = 0;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                virtual int64_t GetLengthImpl() const noexcept = 0;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                virtual <span class="keywordtype">bool</span> SeekImpl(<a class="code" href="namespaceAws_1_1Crt_1_1Io.html#af399239ad685d64f2f5b88a0906a232c">OffsetType</a> <a class="code" href="namespaceAws.html#a4b36e73e20878ce98336cfdea0494281">offset</a>, <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0">StreamSeekBasis</a> seekBasis) noexcept = 0;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;              private:</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                static <span class="keywordtype">int</span> s_Seek(aws_input_stream *stream, aws_off_t <a class="code" href="namespaceAws.html#a4b36e73e20878ce98336cfdea0494281">offset</a>, enum aws_stream_seek_basis basis);</div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1InputStream.html#a298a36dc295090095ddb98946b4d0da2">  110</a></span>&#160;                static <span class="keywordtype">int</span> s_Read(aws_input_stream *stream, aws_byte_buf *dest);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                static <span class="keywordtype">int</span> s_GetStatus(aws_input_stream *stream, aws_stream_status *status);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                static <span class="keywordtype">int</span> s_GetLength(struct aws_input_stream *stream, int64_t *out_length);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                static <span class="keywordtype">void</span> s_Destroy(struct aws_input_stream *stream);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                static aws_input_stream_vtable s_vtable;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            };</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="comment">            /***</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">             * Implementation of Aws::Crt::Io::InputStream that wraps a std::input_stream.</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Io_1_1StdIOStreamInputStream.html">  121</a></span>&#160;            class <a class="code" href="Exports_8h.html#a0a3f6c46aee6b588ce99a142cdb22d1d">AWS_CRT_CPP_API</a> <a class="code" href="classAws_1_1Crt_1_1Io_1_1StdIOStreamInputStream.html">StdIOStreamInputStream</a> : public <a class="code" href="classAws_1_1Crt_1_1Io_1_1InputStream.html">InputStream</a></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;              <span class="keyword">public</span>:</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Io_1_1StdIOStreamInputStream.html">StdIOStreamInputStream</a>(</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                    std::shared_ptr&lt;Aws::Crt::Io::IStream&gt; stream,</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt.html#a3c9efb213e2de565038afcfd4f8afcda">Aws::Crt::Allocator</a> *allocator = <a class="code" href="namespaceAws_1_1Crt.html#a7178ef65f261a8db52a624458331bbb2">g_allocator</a>) noexcept;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                <span class="keywordtype">bool</span> IsValid() <span class="keyword">const</span> noexcept <span class="keyword">override</span>;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;              <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                <span class="keywordtype">bool</span> ReadImpl(<a class="code" href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">ByteBuf</a> &amp;<a class="code" href="namespaceAws.html#ab680d00d3625d576b9160710e643da63">buffer</a>) noexcept <span class="keyword">override</span>;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#a610cfe7a844d9e8b9ea7e319bc1ed1ea">StreamStatus</a> GetStatusImpl() <span class="keyword">const</span> noexcept <span class="keyword">override</span>;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                int64_t GetLengthImpl() <span class="keyword">const</span> noexcept <span class="keyword">override</span>;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                <span class="keywordtype">bool</span> SeekImpl(<a class="code" href="namespaceAws_1_1Crt_1_1Io.html#af399239ad685d64f2f5b88a0906a232c">OffsetType</a> offsetType, <a class="code" href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0">StreamSeekBasis</a> seekBasis) noexcept <span class="keyword">override</span>;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;              <span class="keyword">private</span>:</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                std::shared_ptr&lt;Aws::Crt::Io::IStream&gt; m_stream;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            };</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        } <span class="comment">// namespace Io</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }     <span class="comment">// namespace Crt</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;} <span class="comment">// namespace Aws</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespaceAws_1_1Crt_html_a3c9efb213e2de565038afcfd4f8afcda"><div class="ttname"><a href="namespaceAws_1_1Crt.html#a3c9efb213e2de565038afcfd4f8afcda">Aws::Crt::Allocator</a></div><div class="ttdeci">aws_allocator Allocator</div><div class="ttdef"><b>Definition:</b> StlAllocator.h:25</div></div>
<div class="ttc" id="anamespaceAws_html_a52c438299b08516e5d87b48ded603a6e"><div class="ttname"><a href="namespaceAws.html#a52c438299b08516e5d87b48ded603a6e">Aws::length</a></div><div class="ttdeci">size_t length</div><div class="ttdef"><b>Definition:</b> cJSON.h:159</div></div>
<div class="ttc" id="aTypes_8h_html"><div class="ttname"><a href="Types_8h.html">Types.h</a></div></div>
<div class="ttc" id="aExports_8h_html_a0a3f6c46aee6b588ce99a142cdb22d1d"><div class="ttname"><a href="Exports_8h.html#a0a3f6c46aee6b588ce99a142cdb22d1d">AWS_CRT_CPP_API</a></div><div class="ttdeci">#define AWS_CRT_CPP_API</div><div class="ttdef"><b>Definition:</b> Exports.h:34</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Io_html_adf764940aea50b061f1ac67366cf41d0"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0">Aws::Crt::Io::StreamSeekBasis</a></div><div class="ttdeci">StreamSeekBasis</div><div class="ttdef"><b>Definition:</b> Stream.h:31</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_html_a7178ef65f261a8db52a624458331bbb2"><div class="ttname"><a href="namespaceAws_1_1Crt.html#a7178ef65f261a8db52a624458331bbb2">Aws::Crt::g_allocator</a></div><div class="ttdeci">Allocator * g_allocator</div><div class="ttdef"><b>Definition:</b> Api.cpp:28</div></div>
<div class="ttc" id="anamespaceAws_html_ab680d00d3625d576b9160710e643da63"><div class="ttname"><a href="namespaceAws.html#ab680d00d3625d576b9160710e643da63">Aws::buffer</a></div><div class="ttdeci">p buffer</div><div class="ttdef"><b>Definition:</b> cJSON.cpp:1033</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_html_aa760a7d9714d6c28091c2b1cf7029876"><div class="ttname"><a href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">Aws::Crt::ByteBuf</a></div><div class="ttdeci">aws_byte_buf ByteBuf</div><div class="ttdef"><b>Definition:</b> Types.h:43</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Io_html_adf764940aea50b061f1ac67366cf41d0a87557f11575c0ad78e4e28abedc13b6e"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0a87557f11575c0ad78e4e28abedc13b6e">Aws::Crt::Io::StreamSeekBasis::End</a></div><div class="ttdeci">@ End</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Io_html_af399239ad685d64f2f5b88a0906a232c"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Io.html#af399239ad685d64f2f5b88a0906a232c">Aws::Crt::Io::OffsetType</a></div><div class="ttdeci">aws_off_t OffsetType</div><div class="ttdef"><b>Definition:</b> Stream.h:28</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Io_html_adf764940aea50b061f1ac67366cf41d0a1a06729125544cab7cee73195fc044f0"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Io.html#adf764940aea50b061f1ac67366cf41d0a1a06729125544cab7cee73195fc044f0">Aws::Crt::Io::StreamSeekBasis::Begin</a></div><div class="ttdeci">@ Begin</div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Io_1_1StdIOStreamInputStream_html"><div class="ttname"><a href="classAws_1_1Crt_1_1Io_1_1StdIOStreamInputStream.html">Aws::Crt::Io::StdIOStreamInputStream</a></div><div class="ttdef"><b>Definition:</b> Stream.h:122</div></div>
<div class="ttc" id="anamespaceAws_html"><div class="ttname"><a href="namespaceAws.html">Aws</a></div><div class="ttdef"><b>Definition:</b> Api.h:25</div></div>
<div class="ttc" id="anamespaceAws_html_a4b36e73e20878ce98336cfdea0494281"><div class="ttname"><a href="namespaceAws.html#a4b36e73e20878ce98336cfdea0494281">Aws::offset</a></div><div class="ttdeci">buffer offset</div><div class="ttdef"><b>Definition:</b> cJSON.cpp:908</div></div>
<div class="ttc" id="aExports_8h_html"><div class="ttname"><a href="Exports_8h.html">Exports.h</a></div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Io_1_1InputStream_html"><div class="ttname"><a href="classAws_1_1Crt_1_1Io_1_1InputStream.html">Aws::Crt::Io::InputStream</a></div><div class="ttdef"><b>Definition:</b> Stream.h:42</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Io_html_a610cfe7a844d9e8b9ea7e319bc1ed1ea"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Io.html#a610cfe7a844d9e8b9ea7e319bc1ed1ea">Aws::Crt::Io::StreamStatus</a></div><div class="ttdeci">aws_stream_status StreamStatus</div><div class="ttdef"><b>Definition:</b> Stream.h:27</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
